package com.photoeditor.demo.ui.activity.setting;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.photoeditor.R;
import com.photoeditor.demo.app.XActivity;
import com.photoeditor.demo.util.FontUtil;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by Lai on 2018/9/18 0018.
 */
public class SettingActivity extends XActivity {

    @Bind(R.id.setting_top)
    View mToolbarView;
    @Bind(R.id.filter_store_top_back)
    ImageView mToolbarBack;
    @Bind(R.id.filter_store_top_name)
    TextView mToolbarTitle;

    public static void startActivity(Context activity) {
        activity.startActivity(new Intent(activity, SettingActivity.class));
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_setting);
        ButterKnife.bind(this);

        initView();
    }

    private void initView() {
        // TODO:屏蔽主题
//        StatusBarCompat.setStatusBarColor(this, getResources().getColor(R.color.colorPrimary));
        //StatusBarCompat.setStatusBarColor(this, ThemeManager.getInstance().getResId(getTheme(), R.attr.skin_color_primary));
        mToolbarView.setBackgroundResource(R.drawable.store_top_panel_bg);
        mToolbarBack.setImageResource(R.drawable.icon_back);
        mToolbarTitle.setText(R.string.first_setting_settings);
        mToolbarTitle.setTextColor(getResources().getColor(R.color.title_color));
        FontUtil.setCustomFontBold(mToolbarTitle);

    }

    @OnClick(R.id.filter_store_top_back)
    void onToolbarClick() {
        finish();
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        ButterKnife.unbind(this);
    }
}
